import random
from typing import Union  # Alt+Enter 自动导包

a: int = 10
b = 5  # type: int


def func1(a: int, b: str) -> str:
    return str(a) + b


class Person(object):
    pass


student: Person = Person()  # Person

list1: list[float] = [1.1, 2.5, 3.36]

tuple1: tuple[str, str, bool, int] = ("b", "b", True, 12)

dict1: dict[str, str] = {"name": "wxm", "number": "20226778"}

c: int = random.randint(1, 10)

# 使用Union类型


list2: list[Union[float, int, str, bool]] = [1.1, 2, 4, 5, "sdssf", False]

tuple2: tuple[str, str, bool, int] = ("b", "b", True, 12)

dict2: dict[str, Union[str, int]] = {"name": "wxm", "number": 20226778}


# Ctrl+P 提示
def func2(data: Union[int, str]) -> Union[bool, str]:
    pass
